<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link href="//cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <link href="../css/main.css" rel="stylesheet">
    <link href="../css/common.css" rel="stylesheet">
    <link href="../css/recharge.css" rel="stylesheet">
    <script src="//at.alicdn.com/t/font_491183_wcpwobo2e0tqpvi.js"></script>
    <title>Document</title>
</head>

<body>
    <header></header>
    <div class="user">
        <div class="clearfix">
            <div class="user_nav">
                <div>
                    <h4>
                        <svg class="icon" aria-hidden="true">
                            <use xlink:href="#icon-liebiao"></use>
                        </svg>
                        资金总览</h4>
                    <a href="/user/pandect.html">资金总览</a>
                    <a href="/user/recharge.html">充值</a>
                    <a href="/user/enchashment.html">提现</a>
                    <a href="/user/record.html">交易查询</a>
                    <a href="/user/user.html">账户认证</a>
                </div>
                <div>
                    <h4>
                        <svg class="icon" aria-hidden="true">
                            <use xlink:href="#icon-touzi-copy"></use>
                        </svg>
                        我的投资</h4>
                    <a href="/user/myBidPlanList.html">点点安赢</a>
                    <a href="/user/vip.html">点点专享</a>
                    <a href="/user/assignment.html">自动投标</a>
                </div>
                <div>
                    <h4>
                        <svg class="icon" aria-hidden="true">
                            <use xlink:href="#icon-moneybag"></use>
                        </svg>
                        我的投资</h4>
                    <a href="/user/myloan.html">我的借款</a>
                </div>
            </div>
            <div class="recharge tab-pane">
                <h4>
                    <a href="/user/user.html">账户中心</a>
                    <a>></a>
                    <a class="active">我的消息</a>
                </h4>
                <p class="msgBtn">
                    <span onclick="updateMessage(1)">标记为已读</span>
                    <span onclick="updateMessage(2)">批量删除</span>
                </p>
                <div class="point_list_title row msgTitle">
                    <div class="text-center msgCheck">
                        <input type="checkbox">
                    </div>
                    <div class="text-center">消息类型</div>
                    <div class="text-center">消息标题</div>
                    <div class="text-center">收件时间</div>
                    <div class="text-center">操作</div>
                </div>
                <div class="text-center">
                    <div class="point_list_info row msgNo">
                        <div class="text-center msgCheck">
                            <input type="checkbox" value="123">
                        </div>
                        <div class="text-center">优惠券通知</div>
                        <div class="text-center">优惠券过期提醒</div>
                        <div class="text-center">2017-04-01</div>
                        <div class="text-center">
                            <a href="#">查看</a>|
                            <a onclick="deleteMessage(id)">删除</a>
                        </div>
                    </div>
                    <div class="point_list_info row msgRead">
                        <div class="text-center msgCheck">
                            <input type="checkbox">
                        </div>
                        <div class="text-center">优惠券通知</div>
                        <div class="text-center">优惠券过期提醒</div>
                        <div class="text-center">2017-04-01</div>
                        <div class="text-center">
                            <a href="#">查看</a>|
                            <a onclick="deleteMessage(id)">删除</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <footer></footer>
    <script src="//at.alicdn.com/t/font_380032_fc89xibpf401kyb9.js"></script>
    <script src="//cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <script src="//cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <script>
        $(".point_list_title.msgTitle>.text-center.msgCheck").click(function () {
            if ($(this).find("input").prop("checked")) {
                $(".msgCheck input").attr("checked", "true")
            } else {
                $(".msgCheck input").attr("checked", false)
            }
        })
        function updateMessage(state) {
            var idAll = [];
            $(".msgCheck input:checked").each(function () {
                idAll.push($(this).val())
            })
            $.getJSON(basepath + "message/isUpdateOaNewsMessage.do", {
                "state": state,
                "ids": idAll
            }).done(function (responseText, statusText) {
                if (statusText = "success") {
                    location.reload()
                }
            })
        }
        function deleteMessage(id) {
            $.getJSON(basepath + "message/isDeleteOaNewsMessage.do", {
                "ids": id
            }).done(function (responseText, statusText) {
                if (statusText = "success") {
                    location.reload()
                }
            })
        }
    </script>
</body>

</html>